#ifndef __INCLUDE_GUI_NOTICE_H__
#define __INCLUDE_GUI_NOTICE_H__

#include <stddef.h>
#include <stdint.h>
#include "GUI_Basic.h"
#include "LCD_VirtualDeviceParameter.h"

#define NOTICE_FONT_SIZE				(FONT_SIZE_H12)
#define NOTICE_ICON_SIZE				(24)
#define NOTICE_BOX_EDGE_DIST			(6)

#define NOTICE_BOX_WIDTH				(LCD_SIZE_WIDTH-NOTICE_BOX_EDGE_DIST*2)
#define NOTICE_BOX_MARGIN				(2)
#define NOTICE_BOX_HEIGHT_MIN			(g_stFontSize[NOTICE_FONT_SIZE].Height*2+NOTICE_BOX_MARGIN*2)
#define NOTICE_BOX_HEIGHT_MAX			(LCD_SIZE_HEIGHT-NOTICE_BOX_EDGE_DIST*2)
#define NOTICE_BOX_HEIGHT(LINES)		(LINES*g_stFontSize[NOTICE_FONT_SIZE].Height+NOTICE_BOX_MARGIN*2)
#define NOTICE_BOX_POSX					(NOTICE_BOX_EDGE_DIST)
#define NOTICE_BOX_POSY(HEIGHT)			((LCD_SIZE_HEIGHT-HEIGHT)/2)

#define NOTICE_TEXT_AREA_WIDTH_NOICON	(NOTICE_BOX_WIDTH-NOTICE_BOX_MARGIN*4)
#define	NOTICE_TEXT_AREA_WIDTH			(NOTICE_TEXT_AREA_WIDTH_NOICON-NOTICE_ICON_SIZE-NOTICE_BOX_MARGIN*2)
#define NOTICE_TEXT_AREA_HEIGHT(LINES)	(NOTICE_BOX_HEIGHT(LINES)-NOTICE_BOX_MARGIN*2)
#define NOTICE_TEXT_AREA_HEIGHT_MIN		(g_stFontSize[NOTICE_FONT_SIZE].Height*2)
#define NOTICE_TEXT_AREA_HEIGHT_MAX		(NOTICE_BOX_HEIGHT_MAX-NOTICE_BOX_MARGIN*2)
#define NOTICE_TEXT_POSX_NOICON			(NOTICE_BOX_POSX+NOTICE_BOX_MARGIN*2)
#define NOTICE_TEXT_POSX				(NOTICE_TEXT_POSX_NOICON+NOTICE_ICON_SIZE+NOTICE_BOX_MARGIN*2)
#define NOTICE_TEXT_POSY(HEIGHT)		(NOTICE_BOX_POSY(HEIGHT)+NOTICE_BOX_MARGIN)
#define	NOTICE_TEXT_LINES_MAX			(NOTICE_TEXT_AREA_WIDTH/g_stFontSize[NOTICE_FONT_SIZE].Width)
#define	NOTICE_TEXT_LINES_MAX_NOICON	(NOTICE_TEXT_AREA_WIDTH_NOICON/g_stFontSize[NOTICE_FONT_SIZE].Width)

typedef enum
{
	ICON_NONE			=0,
	ICON_ERROR,
	ICON_INFORMATION,
	ICON_QUESTION,
	ICON_WARNING,
}NOTICE_ICON;

extern const uint8_t* g_arrNoticeIcon[];

uint16_t GUI_Notice_ShowNotice(char* szNoticeText, uint16_t uiTextOffset, NOTICE_ICON eIcon);

#endif // __INCLUDE_GUI_NOTICE_H__
